package com.avecsys.quotemanager.pojos;

import java.io.Serializable;

/**
 * @author Sam Sundar K
 * 
 */
public class SupplierUsersPojo extends BasePojo implements Serializable {

	private Long supplierUserId;

	private SupplierMasterPojo supplierMasterPojo = new SupplierMasterPojo();

	private UserMasterPojo userMasterPojo = new UserMasterPojo();

	private String isAdmin;

	public String getIsAdmin() {
		return isAdmin;
	}

	@Override
	public String getPkColumnName() {
		return "supplierUserId";
	}

	public SupplierMasterPojo getSupplierMasterPojo() {
		return supplierMasterPojo;
	}

	public Long getSupplierUserId() {
		return supplierUserId;
	}

	public UserMasterPojo getUserMasterPojo() {
		return userMasterPojo;
	}

	@Override
	public boolean isPersisted() {
		if (supplierUserId == null || supplierUserId.intValue() == 0) {
			return false;
		} else {
			return true;
		}
	}

	public void setIsAdmin(String isAdmin) {
		this.isAdmin = isAdmin;
	}

	public void setSupplierMasterPojo(SupplierMasterPojo supplierMasterPojo) {
		this.supplierMasterPojo = supplierMasterPojo;
	}

	public void setSupplierUserId(Long supplierUserId) {
		this.supplierUserId = supplierUserId;
	}

	public void setUserMasterPojo(UserMasterPojo userMasterPojo) {
		this.userMasterPojo = userMasterPojo;
	}

}
